package com.eduhzy.ttw.commonsdk.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author xubo
 * @date 2018/7/30 14:41
 */
public class RatingHomeData implements Parcelable {

    /**
     * applyEndDate : 1535558400000
     * applyStartDate : 1534867200000
     * auditEndDate : 1535817600000
     * auditStartDate : 1534867200000
     * configId : 768
     * endDate : 1536336000000
     * groupName : 湖南省教育厅
     * id : 769
     * imgUrl : http://192.168.0.108:8299//pb/u/cms/www/201808/22160728u8da.jpg
     * isActive : 1
     * isApp : 1
     * name : 测试活动6
     * publicEndDate : 1536336000000
     * publicStartDate : 1535904000000
     * researchWorksItem : {"dataContent":"","dataType":1,"describes":"要求为参评的作品文档。","fileType":0,"fileTypeName":"所有类","id":636,"isMust":1,"isPublic":1,"isUpload":0,"maxNum":1,"maxSize":1073741824,"name":"论文作品","realMaxSize":1024,"researchId":769,"seq":2}
     * startDate : 1534867200000
     * status : 2
     * statusStr : 大众投票
     */
    private int worksId;
    private long applyEndDate;
    private long applyStartDate;
    private long auditEndDate;
    private long auditStartDate;
    private int configId;
    private long endDate;
    private String groupName;
    private int id;
    private String imgUrl;
    private int isActive;
    private int isApp;
    private String name;
    private long publicEndDate;
    private long publicStartDate;
    private ResearchWorksItemBean researchWorksItem;
    private long startDate;
    private int status;
    private String statusStr;
    /**
     * userRight : {"couldUpdate":0,"couldUpload":0,"couldVote":0}
     */

    private UserRightBean userRight;

    public int getWorksId() {
        return worksId;
    }

    public void setWorksId(int worksId) {
        this.worksId = worksId;
    }

    public long getApplyEndDate() {
        return applyEndDate;
    }

    public void setApplyEndDate(long applyEndDate) {
        this.applyEndDate = applyEndDate;
    }

    public long getApplyStartDate() {
        return applyStartDate;
    }

    public void setApplyStartDate(long applyStartDate) {
        this.applyStartDate = applyStartDate;
    }

    public long getAuditEndDate() {
        return auditEndDate;
    }

    public void setAuditEndDate(long auditEndDate) {
        this.auditEndDate = auditEndDate;
    }

    public long getAuditStartDate() {
        return auditStartDate;
    }

    public void setAuditStartDate(long auditStartDate) {
        this.auditStartDate = auditStartDate;
    }

    public int getConfigId() {
        return configId;
    }

    public void setConfigId(int configId) {
        this.configId = configId;
    }

    public long getEndDate() {
        return endDate;
    }

    public void setEndDate(long endDate) {
        this.endDate = endDate;
    }

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public int getIsActive() {
        return isActive;
    }

    public void setIsActive(int isActive) {
        this.isActive = isActive;
    }

    public int getIsApp() {
        return isApp;
    }

    public void setIsApp(int isApp) {
        this.isApp = isApp;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public long getPublicEndDate() {
        return publicEndDate;
    }

    public void setPublicEndDate(long publicEndDate) {
        this.publicEndDate = publicEndDate;
    }

    public long getPublicStartDate() {
        return publicStartDate;
    }

    public void setPublicStartDate(long publicStartDate) {
        this.publicStartDate = publicStartDate;
    }

    public ResearchWorksItemBean getResearchWorksItem() {
        return researchWorksItem;
    }

    public void setResearchWorksItem(ResearchWorksItemBean researchWorksItem) {
        this.researchWorksItem = researchWorksItem;
    }

    public long getStartDate() {
        return startDate;
    }

    public void setStartDate(long startDate) {
        this.startDate = startDate;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getStatusStr() {
        return statusStr;
    }

    public void setStatusStr(String statusStr) {
        this.statusStr = statusStr;
    }

    public UserRightBean getUserRight() {
        return userRight;
    }

    public void setUserRight(UserRightBean userRight) {
        this.userRight = userRight;
    }

    public static class ResearchWorksItemBean implements Parcelable {

        /**
         * dataContent :
         * dataType : 1
         * describes : 要求为参评的作品文档。
         * fileType : 0
         * fileTypeName : 所有类
         * id : 636
         * isMust : 1
         * isPublic : 1
         * isUpload : 0
         * maxNum : 1
         * maxSize : 1073741824
         * name : 论文作品
         * realMaxSize : 1024
         * researchId : 769
         * seq : 2
         */

        private String dataContent;
        private int dataType;
        private String describes;
        private int fileType;
        private String fileTypeName;
        private int id;
        private int isMust;
        private int isPublic;
        private int isUpload;
        private int maxNum;
        private int maxSize;
        private String name;
        private int realMaxSize;
        private int researchId;
        private int seq;

        public String getDataContent() {
            return dataContent;
        }

        public void setDataContent(String dataContent) {
            this.dataContent = dataContent;
        }

        public int getDataType() {
            return dataType;
        }

        public void setDataType(int dataType) {
            this.dataType = dataType;
        }

        public String getDescribes() {
            return describes;
        }

        public void setDescribes(String describes) {
            this.describes = describes;
        }

        public int getFileType() {
            return fileType;
        }

        public void setFileType(int fileType) {
            this.fileType = fileType;
        }

        public String getFileTypeName() {
            return fileTypeName;
        }

        public void setFileTypeName(String fileTypeName) {
            this.fileTypeName = fileTypeName;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public int getIsMust() {
            return isMust;
        }

        public void setIsMust(int isMust) {
            this.isMust = isMust;
        }

        public int getIsPublic() {
            return isPublic;
        }

        public void setIsPublic(int isPublic) {
            this.isPublic = isPublic;
        }

        public int getIsUpload() {
            return isUpload;
        }

        public void setIsUpload(int isUpload) {
            this.isUpload = isUpload;
        }

        public int getMaxNum() {
            return maxNum;
        }

        public void setMaxNum(int maxNum) {
            this.maxNum = maxNum;
        }

        public int getMaxSize() {
            return maxSize;
        }

        public void setMaxSize(int maxSize) {
            this.maxSize = maxSize;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public int getRealMaxSize() {
            return realMaxSize;
        }

        public void setRealMaxSize(int realMaxSize) {
            this.realMaxSize = realMaxSize;
        }

        public int getResearchId() {
            return researchId;
        }

        public void setResearchId(int researchId) {
            this.researchId = researchId;
        }

        public int getSeq() {
            return seq;
        }

        public void setSeq(int seq) {
            this.seq = seq;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.dataContent);
            dest.writeInt(this.dataType);
            dest.writeString(this.describes);
            dest.writeInt(this.fileType);
            dest.writeString(this.fileTypeName);
            dest.writeInt(this.id);
            dest.writeInt(this.isMust);
            dest.writeInt(this.isPublic);
            dest.writeInt(this.isUpload);
            dest.writeInt(this.maxNum);
            dest.writeInt(this.maxSize);
            dest.writeString(this.name);
            dest.writeInt(this.realMaxSize);
            dest.writeInt(this.researchId);
            dest.writeInt(this.seq);
        }

        public ResearchWorksItemBean() {
        }

        protected ResearchWorksItemBean(Parcel in) {
            this.dataContent = in.readString();
            this.dataType = in.readInt();
            this.describes = in.readString();
            this.fileType = in.readInt();
            this.fileTypeName = in.readString();
            this.id = in.readInt();
            this.isMust = in.readInt();
            this.isPublic = in.readInt();
            this.isUpload = in.readInt();
            this.maxNum = in.readInt();
            this.maxSize = in.readInt();
            this.name = in.readString();
            this.realMaxSize = in.readInt();
            this.researchId = in.readInt();
            this.seq = in.readInt();
        }

        public static final Creator<ResearchWorksItemBean> CREATOR = new Creator<ResearchWorksItemBean>() {
            @Override
            public ResearchWorksItemBean createFromParcel(Parcel source) {
                return new ResearchWorksItemBean(source);
            }

            @Override
            public ResearchWorksItemBean[] newArray(int size) {
                return new ResearchWorksItemBean[size];
            }
        };
    }

    public RatingHomeData() {
    }

    public static class UserRightBean implements Parcelable {

        /**
         * couldUpdate : 0
         * couldUpload : 0
         * couldVote : 0
         */

        private int couldUpdate;
        private int couldUpload;
        private int couldVote;

        public int getCouldUpdate() {
            return couldUpdate;
        }

        public void setCouldUpdate(int couldUpdate) {
            this.couldUpdate = couldUpdate;
        }

        public int getCouldUpload() {
            return couldUpload;
        }

        public void setCouldUpload(int couldUpload) {
            this.couldUpload = couldUpload;
        }

        public int getCouldVote() {
            return couldVote;
        }

        public void setCouldVote(int couldVote) {
            this.couldVote = couldVote;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeInt(this.couldUpdate);
            dest.writeInt(this.couldUpload);
            dest.writeInt(this.couldVote);
        }

        public UserRightBean() {
        }

        protected UserRightBean(Parcel in) {
            this.couldUpdate = in.readInt();
            this.couldUpload = in.readInt();
            this.couldVote = in.readInt();
        }

        public static final Creator<UserRightBean> CREATOR = new Creator<UserRightBean>() {
            @Override
            public UserRightBean createFromParcel(Parcel source) {
                return new UserRightBean(source);
            }

            @Override
            public UserRightBean[] newArray(int size) {
                return new UserRightBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.worksId);
        dest.writeLong(this.applyEndDate);
        dest.writeLong(this.applyStartDate);
        dest.writeLong(this.auditEndDate);
        dest.writeLong(this.auditStartDate);
        dest.writeInt(this.configId);
        dest.writeLong(this.endDate);
        dest.writeString(this.groupName);
        dest.writeInt(this.id);
        dest.writeString(this.imgUrl);
        dest.writeInt(this.isActive);
        dest.writeInt(this.isApp);
        dest.writeString(this.name);
        dest.writeLong(this.publicEndDate);
        dest.writeLong(this.publicStartDate);
        dest.writeParcelable(this.researchWorksItem, flags);
        dest.writeLong(this.startDate);
        dest.writeInt(this.status);
        dest.writeString(this.statusStr);
        dest.writeParcelable(this.userRight, flags);
    }

    protected RatingHomeData(Parcel in) {
        this.worksId = in.readInt();
        this.applyEndDate = in.readLong();
        this.applyStartDate = in.readLong();
        this.auditEndDate = in.readLong();
        this.auditStartDate = in.readLong();
        this.configId = in.readInt();
        this.endDate = in.readLong();
        this.groupName = in.readString();
        this.id = in.readInt();
        this.imgUrl = in.readString();
        this.isActive = in.readInt();
        this.isApp = in.readInt();
        this.name = in.readString();
        this.publicEndDate = in.readLong();
        this.publicStartDate = in.readLong();
        this.researchWorksItem = in.readParcelable(ResearchWorksItemBean.class.getClassLoader());
        this.startDate = in.readLong();
        this.status = in.readInt();
        this.statusStr = in.readString();
        this.userRight = in.readParcelable(UserRightBean.class.getClassLoader());
    }

    public static final Creator<RatingHomeData> CREATOR = new Creator<RatingHomeData>() {
        @Override
        public RatingHomeData createFromParcel(Parcel source) {
            return new RatingHomeData(source);
        }

        @Override
        public RatingHomeData[] newArray(int size) {
            return new RatingHomeData[size];
        }
    };
}
